package com.timebank.score.service;


import com.timebank.common.core.constant.SecurityConstants;
import com.timebank.common.core.constant.ServiceNameConstants;
import com.timebank.common.core.web.pojo.AjaxResult;
import com.timebank.score.factory.RemoteScoreTaskLogFallBackFactory;
import com.timebank.score.pojo.entity.ScoreTaskLog;
import io.swagger.annotations.Api;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 积分任务记录 服务
 * @author shiliuyinzhen
 */
@FeignClient(contextId = "remoteScoreTaskLogService", value = ServiceNameConstants.SCORE_SERVICE, fallbackFactory = RemoteScoreTaskLogFallBackFactory.class)
@Api(tags = "积分任务记录服务")
public interface RemoteScoreTaskLogService {

    /**
     * 新增任务记录
     * @param scoreTaskLog
     * @param source
     * @return
     */
    @PostMapping("/taskLog")
    AjaxResult addScoreTaskLog(@RequestBody ScoreTaskLog scoreTaskLog,  @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}